package cashpointer.mobile.model;

public class ExtendedCheckBox implements Comparable<ExtendedCheckBox> {
	private Integer id = new Integer(-1);
	private String text = "";
    private boolean isChecked;
    
    public ExtendedCheckBox(Integer id, String text, boolean isChecked) {
    	this.id = id;
    	this.text = text;
    	this.isChecked = isChecked;
    }
	
	public int compareTo(ExtendedCheckBox other) {
        if (this.text != null) {
             return this.text.compareTo(other.getText());
        } else {
             throw new IllegalArgumentException(); 
        }
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public boolean getChecked() {
		return isChecked;
	}

	public void setChecked(boolean isChecked) {
		this.isChecked = isChecked;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
}
